package Day5_07_29;

public class Vehicle {
	
	@Override
	public String toString() {
		return "Vehicle [speed=" + speed + ", size=" + size + "]";
	}
	private double speed;
	private double size;
	public Vehicle() {
		
	}
	public Vehicle(double speed, double size) {
		this.speed = speed;
		this.size = size;
	}
	
	public void move() {
		System.out.println("移动速度："+speed);
	}
	public void speedUp(double up) {
		speed += up;
	}
	public void speedDown(double down) {
		speed -= down;
	}
	
	public double getSpeed() {
		return speed;
	}
	public void setSpeed(double speed) {
		this.speed = speed;
	}
	public double getSize() {
		return size;
	}
	public void setSize(double size) {
		this.size = size;
	}
	
}
